package study.javabasic.classloader;


import java.text.SimpleDateFormat;
import java.util.concurrent.*;

/**
 * @author zhangshuhan
 * @date 2019/3/5
 */
public class JavaClassLoader {


    public static void main(String[] args) throws InterruptedException {
        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(1, 1,
                0L, TimeUnit.MILLISECONDS,
                new LinkedBlockingQueue<>());
        for (int i = 0; i < 10; i++) {
            int finalI = i;
            Thread tem = new Thread(() -> {
                System.out.println("thread:" + finalI);
            });
            threadPoolExecutor.execute(tem);
        }

    }
}
